//
//  HelpExtension.swift
//  DataStructureAndAlgorithm
//
//  Created by icemelon on 2021/8/4.
//

extension Character {
    static var bracketDict: [Character: Character] = ["(": ")", "[": "]", "{": "}"]
    func isLeftBracket(c: Character) -> Bool {
        return Character.bracketDict.keys.contains(c)
    }
}


public func random(count: Int = 15, max: Int = 1000) -> [Int] {
    var array = [Int]()
    for _ in 0...count {
        let r = Int.random(in: 1...max)
        array.append(r)
    }
    return array
}
